package com.tianhao.luo.node;

import com.tianhao.luo.tree.Tree;

/**
 * @author tianhao.luo
 * @date 2019/12/13 16:48
 */
public class TreeNode {
    private Long x;
    private Long y;
    private Tree tree;

    public TreeNode(Long x, Long y, Tree tree) {
        this.x = x;
        this.y = y;
        this.tree = tree;
        GameMap.getInstance().getTreeNodeList().add(this);
    }

    public Long getX() {
        return x;
    }

    public void setX(Long x) {
        this.x = x;
    }

    public Long getY() {
        return y;
    }

    public void setY(Long y) {
        this.y = y;
    }

    public Tree getTree() {
        return tree;
    }

    public void setTree(Tree tree) {
        this.tree = tree;
    }

    @Override
    public String toString() {
        return "TreeNode{" +
                "x=" + x +
                ", y=" + y +
                ", tree=" + tree +
                '}';
    }
}
